* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  background-color: darkslateblue;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
}

.hd {
  width: 100px;
  height: 100px;
  border: solid 1px #ddd;
  background-color: white;
  display: flex;
  padding: 10px;
  justify-content: flex-start;
  align-items: center;
  position: relative;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  overflow: hidden;
}
.hd div {
  position: absolute;
  height: 8px;
  background-color: darkslateblue;
  border-radius: 5px;
  width: 80%;
  transition-duration: 500ms;
}
.hd div:nth-child(1) {
  transform: translateY(20px);
  width: 30%;
}
.hd div:nth-child(2) {
  transform: translateY(-20px);
  width: 60%;
}
.hd.toggle div {
  width: 80%;
}
.hd.toggle div:nth-child(3) {
  transform: translateX(100px);
}
.hd.toggle div:nth-child(1) {
  transform: translateX(0px) rotate(125deg);
}
.hd.toggle div:nth-child(2) {
  transform: translateX(0px) rotate(-125deg);
}